import { memo, useState } from "react";
import LoginStyle from "./style";
import AuthFlow from "../../components/AuthFlow";

const Login = memo(() => {
  const [isLogin, setIslogin] = useState(true);

  const switchClick = (isL: boolean) => {
    setIslogin(isL);
  };

  return (
    <LoginStyle>
      <div className="login">
        <div className="logo">淡云教育</div>
        <AuthFlow
          isLogin={isLogin}
          switchClick={(is: boolean) => switchClick(is)}
        />
      </div>
    </LoginStyle>
  );
});

export default Login;
